package 常用类.enum枚举类.test02;

public class EnumTest02 {
    public static void main(String[] args) {
        Result r = divide(5,0);
        System.out.println(r==Result.SUCCESS ? "计算成功" : "计算失败");
    }
    private static Result divide(int a,int b) {
        try{
            int c = a/b;
            return Result.SUCCESS;
        }catch(Exception e){
            return Result.FAIL;
        }
    }
}
